<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{ title }}</title>
</head>
<body>
<h1>{{ title }}</h1>
<hr/>

<form method="post">
{#    <label>类别名称</label>#}
    {% csrf_token %}
{#    <input type="text" name="name">#}
{#    <br/>#}
{#    <label>类别描述</label>#}
{#    <input type="text" name="comment">#}
{#    <input type="submit" value="保存">#}
{#    {{ form }}#}
    {% for field in form %}
      {% for error in field.errors %}
        <p style="color: red">
        {{ error }}
        </p>
        {% endfor %}
    {% if field.field.required %}<span style="color: red">*</span>{% endif %}
    <label>{{ field.label }}</label>
    {{ field }} <br/>
    {% endfor %}
    <input type="submit" value="保存">
</form>

</body>
</html>